package bm.com.ai.server.vector.config;

import bm.com.ai.server.LLModel.config.QwenModelStoreConfig;
import dev.langchain4j.community.model.dashscope.QwenEmbeddingModel;
import jakarta.annotation.Resource;
import lombok.Data;
import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Component;

@Data
@Component
public class EmbeddingModelConfig {

    @Resource
    QwenModelStoreConfig config;

    @Bean
    public QwenEmbeddingModel embeddingModel(){
        return QwenEmbeddingModel.builder()
                .apiKey(config.getKey())
                .modelName(config.getModelName())
                .build();
    }

}
